#ifndef PROCESSCB_H
#define PROCESSCB_H

#include "thread.h"
#include "machine.h"
#include "addrspace.h"

class ProcessCB
{
public:

	ProcessCB(Thread *thread, int pid, int parentPID);
	~ProcessCB();

	int			getExitStatus() {return exitStatus;}
	int 		getPID() {return pid;}
	int 		getParentPID() {return parentPID;}
	bool		getWaiting() {return waiting;}
	int			getWaitingOn() {return waitingOn; }
	Thread* 	getThread() {return thread;}
	bool 		hasExited() {return exited; }

	void		setExited(bool exited) {this->exited = exited;}
	void		setExitStatus(int exitStatus) {this->exitStatus = exitStatus;}
	void		setWaiting(bool waiting) {this->waiting = waiting;}
	void		setWaitingOn(int waitingOn) {this->waitingOn = waitingOn;}

private:
	bool exited;
	bool waiting;
	int waitingOn;
	int exitStatus;
	int pid;
	int parentPID;
	Thread *thread;	
};

#endif //PROCESSCB_H
